diff options
| author | Adam Soltys <[email protected]> | 2026-02-03 11:41:09 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 15:33:27 -0800 |
| commit | 4bc319a709d27bcdb805294e019d53e25f6e00c5 (patch) | |
| tree | 2ab903d969946ddd6129f2e6b796368adeef65cd /src/routes/(app)/invoice/[id]/tip | |
| parent | 8a6108a56c2e5035fd99c39ea13104cf23d98e2d (diff) | |
| download | coinos-ui-4bc319a709d27bcdb805294e019d53e25f6e00c5.tar.gz coinos-ui-4bc319a709d27bcdb805294e019d53e25f6e00c5.zip | |
fix warnings
Diffstat (limited to 'src/routes/(app)/invoice/[id]/tip')
| -rw-r--r-- | src/routes/(app)/invoice/[id]/tip/+page.svelte | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/routes/(app)/invoice/[id]/tip/+page.svelte b/src/routes/(app)/invoice/[id]/tip/+page.svelte index a1ea3586..2dca611e 100644 --- a/src/routes/(app)/invoice/[id]/tip/+page.svelte +++ b/src/routes/(app)/invoice/[id]/tip/+page.svelte @@ -76,10 +76,10 @@ tip, user: { username }, } = $state(invoice); - let locale = $derived(loc(user)); + let locale = $derived(() => loc(user)); let qr; - let tipPercent = $state((tip / amount) * 100); + let tipPercent = $state(); let fullscreen; @@ -87,6 +87,7 @@ let rate = invoice.rate * (data.rate / data.invoiceRate); $effect(() => { + if (typeof tipPercent === "undefined") tipPercent = (tip / amount) * 100; tip = Math.round((amount / 100) * untrack(() => tipPercent)); }); @@ -173,7 +174,11 @@ </div> {/if} - <button type="submit" bind:this={submit}></button> + <button + type="submit" + bind:this={submit} + aria-label="Submit tip" + ></button> </form> {#if showCustomAmount} |
